<?php

namespace App\Http\Controllers;


use App\Models\Activities;
use Illuminate\Support\Facades\DB;

class ActivityController extends Controller
{
    public function index()
    {
        $activities = Activities::select('id', 'title', 'url', 'image', 'sort', 'created_at')
            ->where('status', 1)
            ->orderBy('created_at', 'desc')
            ->paginate();

        return view('activity.index')->with(['activities' => $activities]);
    }
}